package com.txby.wxyyApi.component.util;

import java.sql.Types;

import org.hibernate.dialect.SQLServer2012Dialect;
import org.hibernate.type.StandardBasicTypes;

/**
 * 重写sql server方言，注册特殊数据类型到hibernate 如nvarchar
* @ClassName: SQLServer2012DialectExt 
* @Description: TODO （描述）
* @author 作者 jacking
* @date 2016-6-29 下午6:38:14
 */
public class SQLServer2012DialectExt extends SQLServer2012Dialect {

	public SQLServer2012DialectExt() {
		super();
		registerHibernateType(Types.CHAR, StandardBasicTypes.STRING.getName());
        registerHibernateType(Types.NCHAR, StandardBasicTypes.STRING.getName());
        registerHibernateType(Types.NVARCHAR, StandardBasicTypes.STRING.getName());  
        registerHibernateType(Types.LONGNVARCHAR, StandardBasicTypes.STRING.getName());  
        registerHibernateType(Types.DECIMAL, StandardBasicTypes.DOUBLE.getName());  
	}
}
